package com.geese.module.security.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.geese.common.entity.Permission;

public interface PermissionMapper {

	/**
	 * 根据ids查询列表
	 */
	List<Permission> listByIds(@Param("ids")List<Integer> ids);

	/**
	 * 获取全部资源列表
	 */
	List<Permission> listAll();

//    int deleteByPrimaryKey(Integer id);
//
//    boolean insert(Permission record);
//
//    int insertSelective(Permission record);
//
//    Permission selectByPrimaryKey(Integer id);
//
//    boolean updateByPrimaryKeySelective(Permission record);
//
//    int updateByPrimaryKey(Permission record);
//
//
//    @Select(" SELECT\n" +
//            "\tpermission0_.id ,\n" +
//            "\tpermission0_.description ,\n" +
//            "\tpermission0_. NAME ,\n" +
//            "\tpermission0_.pid ,\n" +
//            "\tpermission0_.url \n" +
//            "FROM\n" +
//            "\twaiter_permission permission0_\n" +
//            "WHERE\n" +
//            "\tpermission0_.pid > #{id}")
//    List<Permission> findByPidGreateThan(int pid);
//
//
//    @Select("SELECT t1.* FROM waiter_permission t1\n" +
//            "LEFT JOIN waiter_role_permission t2 ON t1.id = t2.permission_id\n" +
//            "LEFT JOIN waiter_role t3 ON t3.id = t2.role_id\n" +
//            "LEFT JOIN waiter_user_role t4 ON t4.role_id = t3.id\n" +
//            "LEFT JOIN waiter_user t5 ON t5.id = t4.user_id\n" +
//            "WHERE t5.id = #{id}")
//    List<Permission> findByUserId(int id);
//
//    @Select("select * from waiter_permission where pid = #{pid}")
//    List<Permission> findByPid(Integer pid);
//
//
//    @Delete("delete from waiter_permission where pid = #{pid}")
//    void deleteByPid(int pid);
}